java.lang
Class Integer

java.lang.Object
  |
  +--java.lang.Number
        |
        +--java.lang.Integer
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public final class Integer
extends java.lang.Number
implements java.lang.Comparable

An instance ``wraps'' (or contains) a value of primitive type int.

See Also:
Serialized Form

Field Summary
static int MIN_VALUE
          The smallest value of type int.
 
Constructor Summary
Integer(int v)
          An object that wraps value v.
 
Method Summary
 int compareTo(Integer i)
          = a positive integer, 0, or a negative integer, depending on whether this Integer is greater than, equal to, or less than i.
 int intValue()
          = the value of this Integer.
 java.lang.String toString()
          = a String representation of this Integer.
 
Methods inherited from class java.lang.Number
byteValue, doubleValue, floatValue, longValue, shortValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

MIN_VALUE

public static final int MIN_VALUE
The smallest value of type int.
Constructor Detail

Integer

public Integer(int v)
An object that wraps value v.
Method Detail

intValue

public int intValue()
= the value of this Integer.
Overrides:
intValue in class java.lang.Number

toString

public java.lang.String toString()
= a String representation of this Integer.
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(Integer i)
= a positive integer, 0, or a negative integer, depending on whether this Integer is greater than, equal to, or less than i. A ClassCastException is thrown if i is not an Integer.